Contract and settlement expression functions

Function Explanation Example
If Boolean with three parameters: (test, true result, false result) IF(Comm.Count = 12, -Park.Amount, 0)
IsNull Determines which of two numbers is "not null". One of the parameters must be a terms code. ISNULL(MinQty, .Ticket.Quantity) [MinQty is a numeric terms code]
Date Calculates a date based on a date expression

Note

This is not the same as the .Date keyword. .Date returns the date on a contract or settlement line.

Security.Hours.History(, DATE(.Date("yesterday")))
Number Converts a string value to a number NUMBER(ATTRIBUTEITEM("Booth"))
AttributeItem Returns an attribute item from the contract. The syntax is AttributeItem("attribute name"). The "attribute name" argument takes a literal string and must be enclosed in quotation marks. IF(ATTRIBUTEITEM("Booth") = "100C", .Price, .Price * .95)
MIN Determines which of two numbers is smaller MIN(.Amount, Comm.Amount.History)
MAX Determines which of two numbers is larger MAX(FoodT.Amount, FoodNT.Amount)
ROUND Rounds a number to the specified number of decimal digits ROUND((Food.Amount * .9361) + Bev.Amount * .7238, 2)
TRUNCATE Truncates the number to the specified number of digits TRUNCATE(PreTick.Quantity, -2)
TRUE TRUE can only reference a user-defined terms code/keyword IF(IntProd = TRUE, .Price, .Price * 1.15), where IntProd is a true/false terms code
FALSE FALSE can only reference a user-defined terms code/keyword IF(IntProd = FALSE, .Price, 0), where IntProde is a true/false terms code